//
//  WuLiangCollectionViewCell.m
//  A_Comic
//
//  Created by sos on 16/1/16.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "WuLiangCollectionViewCell.h"

@implementation WuLiangCollectionViewCell
- (void)dealloc
{
    [_imgView release];
    [_labelOne release];
    [_labelTwo release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
       
        
        self.imgView = [[UIImageView alloc]init];

        [self.contentView addSubview:self.imgView];
        [self.imgView release];
        
        self.labelOne = [[UILabel alloc]init];

        [self.contentView addSubview:self.labelOne];
        [self.labelOne release];
        
        self.labelTwo = [[UILabel alloc]init];

        [self.contentView addSubview:self.labelTwo];
        [self.labelTwo release];
        
        
        
        
        
    }
    return self;
}


-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    
    self.imgView.frame = CGRectMake(0, 0, layoutAttributes.frame.size.width, 100);
    
    self.labelOne.frame = CGRectMake(0, layoutAttributes.frame.size.height - 50, layoutAttributes.frame.size.width, 25);
    self.labelOne.textAlignment = NSTextAlignmentCenter;
    
     self.labelTwo.frame = CGRectMake(0, layoutAttributes.frame.size.height - 25, layoutAttributes.frame.size.width, 25);
    self.labelTwo.font = [UIFont systemFontOfSize:16];
    self.labelTwo.textColor = [UIColor grayColor];
    
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
